package cn.micai.base.string;

/**
 * 描述：反转字符串的Java程序
 * <p> Using for loop
 *
 * @author: 赵新国
 * @date: 2018/6/11 11:25
 */
public class ReverseStringForMain {

    public static void main(String [] args) {

        String blogName = "java2blog";
        String reverse = "";

        for (int i=blogName.length()-1; i>=0; i--) {
            reverse = reverse + blogName.charAt(i);
        }

        System.out.println("Reverse of java2blog is: " + reverse);

    }

}
